class PetDog {
    public String name;//名字
    public String color;//颜色

    //狗的属性
    public void barks() {
        System.out.println(name + ": 旺旺旺!");
    }

    //狗的行为
    public void wag() {
        System.out.println(name + ": 摇尾巴！");
    }
}

public class Test {
    public static void main(String[] args) {
        PetDog petDog1 = new PetDog();
        petDog1.name = "小狗1";
        petDog1.color = "黄色";
        petDog1.barks();
        petDog1.wag();

        PetDog petDog2 = new PetDog();
        petDog2.name = "小狗2";
        petDog2.color = "白色";
        petDog2.barks();
        petDog2.wag();
    }
}
